package com.ccrfid.rmc6.service.video;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.poi.PoiCameraEntity;
import com.ccrfid.rmc6.entity.video.VideoCameraEntity;
import com.ccrfid.rmc6.entity.video.VideoCameraView;
import com.ccrfid.rmc6.pojo.dto.VideoCameraDto;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.sql.Timestamp;
import java.util.List;

public interface VideoCameraService {
    //
    List<VideoCameraView> getAllVideoCameraInfo(SearchCriteria criteria, Sort sort);
    //
    Page<VideoCameraView> getVideoCameraInfoPage(SearchCriteria criteria, Pageable pageable);
    //
    VideoCameraEntity getVideoCamera(Long cameraId);
    //
    VideoCameraDto getCameraLinkageInfo(Long cameraId, String clientIpAddr);

    String getPreviewUrl(Long cameraId, String protocol, String clientIpAddr);

    String getPlaybackUrl(Long cameraId, String protocol, Timestamp startTime, Timestamp stopTime, String clientIpAddr);

    String getVideoClientPlayUrl(String playType, List<Long> cameraIdList, Integer miniUI, Integer clear,
                                 Integer wndSelect, Integer httpsFlag, Timestamp startTime, Timestamp stopTime);
    //
    VideoCameraEntity createVideoCamera(VideoCameraEntity entity) throws AppException;
    //
    VideoCameraEntity updateVideoCamera(Long cameraId, VideoCameraEntity entity) throws AppException;
    //
    PoiCameraEntity getCameraPosition(Long cameraId) throws AppException;
    //
    PoiCameraEntity updateCameraPosition(Long cameraId, PoiCameraEntity entity) throws AppException;
    //
    Boolean deleteCameraPosition(Long cameraId);
    //
    int deleteVideoCamerasInfo(List<Long> idList);
}
